<html>
<head>
<TITLE>Marsems System</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="../css/style.css" type=text/css rel=stylesheet>
<script language="javascript" src="../js/Validation.js" type="text/JavaScript"></script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="get" action="">
<table width="100%" cellspacing="1" cellpadding="4">
  <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
    <td colspan="7" align="left">&nbsp;&nbsp;<font color="#FF0000">Keyword : 
    <input name="keyword" type="text" id="keyword" value="{$keyword}" size="60" maxlength="60" style="height:22px; margin-bottom:2px;"> 
    <select name="searchType" style="height:22px; margin-top:0px;">
  		{html_options options=$arrSearchType selected=$searchTypeS}
	</select>
    	<input type="submit" name="Submit" value="Search"></font>
       <input name="menuGid" type="hidden" id="menuGid" value="{$menuGid}">
      <input name="menuid" type="hidden" id="menuid" value="{$menuid}">
    </td>
    <td width="5%" align="right">&nbsp;<A href="batchProduct.php?menuGid={$menuGid}&menuid={$menuid}" target="_self">Upload Products</A>&nbsp;&nbsp;</td>
  </tr>
  
  	<tr bgcolor="#E4E4E4"> 
    	<td width="5%">&nbsp;&nbsp;ID</td>
    	<td width="30%"><A href="?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&sort=name" target="_self">Name</A></td>
    	<td width="5%">price</td>
     	<td width="5%"><A href="?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&sort=new&orderSuffix={$orderSuffix}" target="_self">New</A></td>
     	<td width="5%"><A href="?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&sort=featured&orderSuffix={$orderSuffix}" target="_self">Featured</A></td>
     	<td width="5%"><A href="?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&sort=hot&orderSuffix={$orderSuffix}" target="_self">Hot</A></td>
     	<td width="5%"><A href="?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&sort=status&orderSuffix={$orderSuffix}" target="_self">Status</A></td>
   		<td width="40%">Operation | <b><a href="listProduct_Add.php?menuGid={$menuGid}&menuid={$menuid}">Add</a></b></td>
	</tr>
  
  <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
    <td colspan="8" align="center"><font color="#FF0000">{$error_message}</font></td>
  </tr>
  
  {foreach item=data from=$arrDataList}
  	<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
	    <td>&nbsp;{$data.id}</td>
	    <td >&nbsp;
	    	{if $checkPID == $data.id}
	    		<font color="#FF0000">{$data.name}</font>
	    	{else}
	    		{$data.name}
	    	{/if}
	    </td>
	    <!--<td>&nbsp;<span title="{$data.description|strip_tags}">{$data.description|strip_tags|truncate:100:"..."}</span></td>-->
	    
	    <td >&nbsp;${$data.price/100}</td>
	    <td >&nbsp;
	    	{if $data.isNew == 1}
	    		Yes
	    	{else}
	    		No
	    	{/if}
	    </td>
	    <td >&nbsp;
	    	{if $data.isFeatured == 1}
	    		Yes
	    	{else}
	    		No
	    	{/if}
	    </td>
	    <td >&nbsp;
	    	{if $data.isHot == 1}
	    		Yes
	    	{else}
	    		No
	    	{/if}
		</td>
	    <td >&nbsp;{$data.status}</td>
	    
	    <td>
	    {if $data.isNew == 1}
	    	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=new&value=0" onClick="return validDefault.isConfirmOperate('set not hot product')">not New</a>
	    {else}
	     	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=new&value=1" onClick="return validDefault.isConfirmOperate('set hot product')">New</a>
	    {/if}
	    &nbsp;&nbsp;|&nbsp;&nbsp;
	    {if $data.isFeatured == 1}
	    	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=featured&value=0" onClick="return validDefault.isConfirmOperate('set not hot product')">not Featured</a>
	    {else}
	     	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=featured&value=1" onClick="return validDefault.isConfirmOperate('set hot product')">Featured</a>
	    {/if}
	    &nbsp;&nbsp;|&nbsp;&nbsp;
	    {if $data.isHot == 1}
	    	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=hot&value=0" onClick="return validDefault.isConfirmOperate('set not hot product')">not Hot</a>
	    {else}
	     	<a href="listProduct_Set.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}&action=hot&value=1" onClick="return validDefault.isConfirmOperate('set hot product')">Hot</a>
	    {/if}
	    &nbsp;&nbsp;|&nbsp;&nbsp;
	    
	    <A href="listProduct_Images.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}" target="_self">Images</A>
	    &nbsp;&nbsp;|&nbsp;&nbsp;
	    <A href="listProduct_Related.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}" target="_self">Related</A>
	    &nbsp;&nbsp;|&nbsp;&nbsp;
	    {section name=opItem loop=$arrOperateInfo}
	   		{if $smarty.section.opItem.index != 0}
	    		&nbsp;&nbsp;|&nbsp;&nbsp;
	   	    {/if}
	
	   		<a href="{$selfFileName}_{$arrOperateInfo[opItem].name}.php?menuGid={$menuGid}&menuid={$menuid}&id={$data.id}" onClick="return validDefault.isConfirmOperate('{$arrOperateInfo[opItem].name}')">{$arrOperateInfo[opItem].viewName}</a>
	   {/section}
	 
	    </td>
  	</tr>
  {/foreach}
</table>
</form>
<table width="100%" cellspacing="0" cellpadding="4">
  <tr> 
    <td align="left" width="60%">{$PAGE_BAR}</td>
    <td align="right" width="40%"></td>
  </tr>
</table>
</body>
</html>